﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Microsoft.Practices.Prism.PubSubEvents;

namespace Public.MvvmBase
{
    /// <summary>
    /// 事件聚合器管理
    /// 使用该功能的项目，必须引用 Microsoft.Practices.Prism.PubSubEvents 命名空间
    /// </summary>
    public class EventAggregatorManager
    {
        private static readonly object _lock = new object();
        private static EventAggregator _Instance;
        public static EventAggregator Instance
        {
            get
            {
                lock (_lock)
                    if (_Instance == null)
                        lock (_lock)
                            _Instance = new EventAggregator();

                return _Instance;
            }
        }
    }

    /// <summary>
    /// Mode
    /// </summary>
    public class LoginStatusReport : PubSubEvent<object> { }
}
